package com.jinli.security.auth.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jinli.security.auth.model.User;
import com.jinli.security.auth.service.IUserService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jin
 * @since 2024-12-24
 */
@RestController
@RequestMapping("/auth/user")
public class UserController {

    @Resource
    private IUserService userService;


    @GetMapping("/query")
    public String query() {
        User admin = userService.getOne(new LambdaQueryWrapper<User>().eq(User::getUserName, "admin"));
        System.out.println(admin);
        return "query";
    }
}
